
package laya.semi.process;

import java.util.*;

public class GenericClassActivityHandler
	implements IActivityHandler
{
	private Map m_oActivities = new HashMap();
	
	public void doActivity(String oActivity, IProcessContext oCtx)
		throws Exception
	{
		IGenericClassActivity oActObj = (IGenericClassActivity)m_oActivities.get(oActivity);
		if (null == oActObj)
		{
			oActObj = (IGenericClassActivity)Class.forName(oActivity).newInstance();
			m_oActivities.put(oActivity, oActObj);
		}
		
		oActObj.execute(oCtx);
	}
}
